package org.springblade.modules.repair.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Date 10:31 2023/11/21
 * @Description {
 *   工单类型描述
 * }
 * @Author lsay
 **/
@Getter
@AllArgsConstructor
public enum WorkOrderTypeEnum {

	/**
	 * 对应数据库表里面的work_order_type字段
	 */
	INTERIOR(1, "内部整改"),
	CLIENT(2, "客户报障");

	final int id;
	final String name;
	public static String getName(int id){
		WorkOrderTypeEnum[] enums = WorkOrderTypeEnum.values();
		for (WorkOrderTypeEnum typeEnum : enums) {
			if(typeEnum.getId() == id){
				return typeEnum.getName();
			}
		}
		return null;
	}

}
